<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: hal_swi_uart.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00503.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">hal_swi_uart.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>ATCA Hardware abstraction layer for SWI over UART drivers.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &quot;<a class="el" href="a00368_source.html">atca_hal.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="a00506_source.html">hal_swi_uart.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="a00155_source.html">atca_device.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="a00164_source.html">atca_execution.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga53864a301dac6efbdbdc3931aa79e23e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#ga53864a301dac6efbdbdc3931aa79e23e">hal_swi_discover_buses</a> (int swi_buses[], int max_buses)</td></tr>
<tr class="memdesc:ga53864a301dac6efbdbdc3931aa79e23e"><td class="mdescLeft">&#160;</td><td class="mdescRight">discover swi buses available for this hardware this maintains a list of logical to physical bus mappings freeing the application.This function is currently not supported. of the a-priori knowledge  <a href="a00993.html#ga53864a301dac6efbdbdc3931aa79e23e">More...</a><br /></td></tr>
<tr class="separator:ga53864a301dac6efbdbdc3931aa79e23e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga354e6fa757688b73e6fb5293bb835def"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#ga354e6fa757688b73e6fb5293bb835def">hal_swi_discover_devices</a> (int bus_num, <a class="el" href="a01013.html">ATCAIfaceCfg</a> cfg[], int *found)</td></tr>
<tr class="memdesc:ga354e6fa757688b73e6fb5293bb835def"><td class="mdescLeft">&#160;</td><td class="mdescRight">discover any CryptoAuth devices on a given logical bus number.This function is curently not supported.  <a href="a00993.html#ga354e6fa757688b73e6fb5293bb835def">More...</a><br /></td></tr>
<tr class="separator:ga354e6fa757688b73e6fb5293bb835def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf406053c1a3f2a86bdc887f2ff4b663d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#gaf406053c1a3f2a86bdc887f2ff4b663d">hal_swi_init</a> (void *hal, <a class="el" href="a01013.html">ATCAIfaceCfg</a> *cfg)</td></tr>
<tr class="memdesc:gaf406053c1a3f2a86bdc887f2ff4b663d"><td class="mdescLeft">&#160;</td><td class="mdescRight">hal_swi_init manages requests to initialize a physical interface. It manages use counts so when an interface has released the physical layer, it will disable the interface for some other use. You can have multiple ATCAIFace instances using the same bus, and you can have multiple ATCAIFace instances on multiple swi buses, so hal_swi_init manages these things and ATCAIFace is abstracted from the physical details.  <a href="a00993.html#gaf406053c1a3f2a86bdc887f2ff4b663d">More...</a><br /></td></tr>
<tr class="separator:gaf406053c1a3f2a86bdc887f2ff4b663d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9186e5235979216330ae580290872c77"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#ga9186e5235979216330ae580290872c77">hal_swi_post_init</a> (<a class="el" href="a00989.html#ga75c11126f3fe81df3d6c27f5bb393303">ATCAIface</a> iface)</td></tr>
<tr class="memdesc:ga9186e5235979216330ae580290872c77"><td class="mdescLeft">&#160;</td><td class="mdescRight">HAL implementation of SWI post init.  <a href="a00993.html#ga9186e5235979216330ae580290872c77">More...</a><br /></td></tr>
<tr class="separator:ga9186e5235979216330ae580290872c77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae96ea936a2e85d0bcb81b7868ee007d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#gaae96ea936a2e85d0bcb81b7868ee007d">hal_swi_send_flag</a> (<a class="el" href="a00989.html#ga75c11126f3fe81df3d6c27f5bb393303">ATCAIface</a> iface, uint8_t data)</td></tr>
<tr class="memdesc:gaae96ea936a2e85d0bcb81b7868ee007d"><td class="mdescLeft">&#160;</td><td class="mdescRight">HAL implementation of SWI send one byte over UART.  <a href="a00993.html#gaae96ea936a2e85d0bcb81b7868ee007d">More...</a><br /></td></tr>
<tr class="separator:gaae96ea936a2e85d0bcb81b7868ee007d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb8b8857192a7710785acce0110e8016"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#gaeb8b8857192a7710785acce0110e8016">hal_swi_send</a> (<a class="el" href="a00989.html#ga75c11126f3fe81df3d6c27f5bb393303">ATCAIface</a> iface, uint8_t *txdata, int txlength)</td></tr>
<tr class="memdesc:gaeb8b8857192a7710785acce0110e8016"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send byte(s) via SWI.  <a href="a00993.html#gaeb8b8857192a7710785acce0110e8016">More...</a><br /></td></tr>
<tr class="separator:gaeb8b8857192a7710785acce0110e8016"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga02e9f36723f0feb21d373898728de04b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#ga02e9f36723f0feb21d373898728de04b">hal_swi_receive</a> (<a class="el" href="a00989.html#ga75c11126f3fe81df3d6c27f5bb393303">ATCAIface</a> iface, uint8_t *rxdata, uint16_t *rxlength)</td></tr>
<tr class="memdesc:ga02e9f36723f0feb21d373898728de04b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive byte(s) via SWI.  <a href="a00993.html#ga02e9f36723f0feb21d373898728de04b">More...</a><br /></td></tr>
<tr class="separator:ga02e9f36723f0feb21d373898728de04b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc428980ec95e37eee94813db229fe70"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#gafc428980ec95e37eee94813db229fe70">hal_swi_wake</a> (<a class="el" href="a00989.html#ga75c11126f3fe81df3d6c27f5bb393303">ATCAIface</a> iface)</td></tr>
<tr class="memdesc:gafc428980ec95e37eee94813db229fe70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send Wake flag via SWI.  <a href="a00993.html#gafc428980ec95e37eee94813db229fe70">More...</a><br /></td></tr>
<tr class="separator:gafc428980ec95e37eee94813db229fe70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga618291172976da96c4f02dc9200c845c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#ga618291172976da96c4f02dc9200c845c">hal_swi_idle</a> (<a class="el" href="a00989.html#ga75c11126f3fe81df3d6c27f5bb393303">ATCAIface</a> iface)</td></tr>
<tr class="memdesc:ga618291172976da96c4f02dc9200c845c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send Idle flag via SWI.  <a href="a00993.html#ga618291172976da96c4f02dc9200c845c">More...</a><br /></td></tr>
<tr class="separator:ga618291172976da96c4f02dc9200c845c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga252e365a30f2583dae8a8eac073a9f53"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#ga252e365a30f2583dae8a8eac073a9f53">hal_swi_sleep</a> (<a class="el" href="a00989.html#ga75c11126f3fe81df3d6c27f5bb393303">ATCAIface</a> iface)</td></tr>
<tr class="memdesc:ga252e365a30f2583dae8a8eac073a9f53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send Sleep flag via SWI.  <a href="a00993.html#ga252e365a30f2583dae8a8eac073a9f53">More...</a><br /></td></tr>
<tr class="separator:ga252e365a30f2583dae8a8eac073a9f53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga196dbc62546b39ac3e556a0f7f6b7132"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00993.html#ga196dbc62546b39ac3e556a0f7f6b7132">hal_swi_release</a> (void *hal_data)</td></tr>
<tr class="memdesc:ga196dbc62546b39ac3e556a0f7f6b7132"><td class="mdescLeft">&#160;</td><td class="mdescRight">Manages reference count on given bus and releases resource if no more reference(s) exist.  <a href="a00993.html#ga196dbc62546b39ac3e556a0f7f6b7132">More...</a><br /></td></tr>
<tr class="separator:ga196dbc62546b39ac3e556a0f7f6b7132"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>ATCA Hardware abstraction layer for SWI over UART drivers. </p>
<dl class="section copyright"><dt>Copyright</dt><dd>(c) 2015-2018 Microchip Technology Inc. and its subsidiaries. </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_e870e4dac26de7990352b1cb7547818f.html">hal</a></li><li class="navelem"><a class="el" href="a00503.html">hal_swi_uart.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
